from PyQt6.QtCore import pyqtSignal
from qfluentwidgets import SystemThemeListener


class SelfThemeListener(SystemThemeListener):
    themeChanged = pyqtSignal(str)

    def __init__(self, parent=None):
        super().__init__(parent=parent)

    def _onThemeChanged(self, theme: str):
        super()._onThemeChanged(theme=theme)
        self.themeChanged.emit(theme)
